package com.heima.search.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.search.dto.ApAssociateSearchDto;
import com.heima.search.pojo.ApAssociateWords;
import com.heima.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/associate")
public class ApAssociateSearch {
    @Autowired
    private SearchService searchService;

    @PostMapping("search")
    public ResponseResult associate(@RequestBody ApAssociateSearchDto apAssociateSearchDto) {
        return searchService.queryAssociate(apAssociateSearchDto);

    }
}
